#include "featureextractortest.h"
#include "../featureextractor.h"
#include "../imageloader.h"

#include <boost/foreach.hpp>
#include "../inputimage.h"
#include "../sift/sift.h"
#include "../sift/imgfeatures.h"
#include "../imagefeature.h"
#include <opencv/highgui.h>
#include "../imageset.h"


using namespace cshotel;
using namespace boost;
using namespace std;
using namespace sift;

void FeatureExtractorTest::setUp() {

}

void FeatureExtractorTest::tearDown() {

	delete imgloader;
	delete featureextractor;

}

void FeatureExtractorTest::testExtractMany() {

	int num, total = 100;
  imageNames.clear();
  for(num = 0; num < total; num++) {
      imageNames.push_back("../src/tests/images/0.jpg");
  }
  imgloader = new ImageLoader( imageNames );
  shared_ptr<ImageSet> imageSet = imgloader->loadImages();
	CPPUNIT_ASSERT_NO_THROW (  featureextractor = new FeatureExtractor(imageSet) );
	CPPUNIT_ASSERT_NO_THROW (	featureextractor->extract() );

}
